package com.hp.ssm.service.impl;

import com.github.pagehelper.PageHelper;
import com.hp.ssm.entity.Cases;
import com.hp.ssm.mapper.CaseMapper;
import com.hp.ssm.service.CaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CaseServiceImpl implements CaseService {
    @Autowired
    private CaseMapper caseMapper;
    /*
     * 基因检测项目*/
    @Override
    public List<Cases> findAll(Cases cases,Integer page,Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.findAll(cases);
    }
    @Override
    public int add(Cases cases) {
        return caseMapper.add(cases);
    }
    @Override
    public Cases findById(Cases cases) {
        return caseMapper.findById(cases);
    }

    @Override
    public int update(Cases cases) {
        return caseMapper.update(cases);
    }
    @Override
    public int delete(Cases cases) {
        return caseMapper.delete(cases);
    }

    @Override
    public List<Cases> delfindAll(Cases cases,Integer page,Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.delfindAll(cases);
    }
    @Override
    public int recover(Cases cases) {
        return caseMapper.recover(cases);
    }
    @Override
    public List<Cases> findAll2(Cases cases,Integer page,Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.findAll2(cases);
    }
    @Override
    public int add2(Cases cases) {
        return caseMapper.add2(cases);
    }

    @Override
    public int update2(Cases cases) {
        return caseMapper.update2(cases);
    }
    @Override
    public List<Cases> delfindAll2(Cases cases,Integer page,Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.delfindAll2(cases);
    }

    @Override
    public List<Cases> findAll3(Cases cases, Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.findAll3(cases);
    }

    @Override
    public int add3(Cases cases) {
        return caseMapper.add3(cases);
    }

    @Override
    public List<Cases> deletefindAll3(Cases cases, Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        return caseMapper.deletefindAll3(cases);
    }
}
